package SecondStepsWTacho;

import lejos.nxt.*;

public class SecondSteps {
	public static void main(String[] args){
		Motor.A.smoothAcceleration(true);
		System.out.println("Speed: " + Motor.A.getSpeed());
		drive();
		Motor.A.setSpeed(800);
		System.out.println("Speed: " + Motor.A.getSpeed());
		drive();
	}
	
	public static void drive(){
		Motor.A.forward();
		while(Motor.A.getTachoCount() < 720){
		}
		Motor.A.flt();
		System.out.println("TC: " + Motor.A.getTachoCount());
		System.out.println("Rotspeed: " + Motor.A.getRotationSpeed());
		while(Motor.A.getRotationSpeed() > 0){
		}
		System.out.println("TC: " + Motor.A.getTachoCount());
		System.out.println("Rotspeed: " + Motor.A.getRotationSpeed());
		Button.waitForPress();
		Motor.A.resetTachoCount();
		LCD.clear();
	}
}
